export interface Todo {
  id: number;
  content: string;
}

export interface Meta {
  totalCount: number;
}

export interface MenuItem {
  name: String;//route name
  title?: String;
  caption?: String; // 小字说明
  link?: String;
  icon?: String;
  children?: MenuItem[];
}

export interface ColumnProperty {
  HeaderName: string;
  PropertyName: string;
  Drop?: string;
  Required?: boolean;
  Format?: string;
  Sort?: Number;
  Export?: boolean;
  Import?: boolean;
  Visible?: boolean;
  Searchable?: boolean;
  Orderable?: boolean;
  Editable?: boolean;
}

export interface TableSetupData {
    loading: boolean;
    columns: ColumnProperty[];
    data: any;
    total: Number;
    pageSize: Number;
    pageIndex: Number;
    selection: boolean;
    selectionFixed: boolean;
    pageFunc: Function;
}

export let defaultTableSetupData = function(): TableSetupData{
    return {
          loading:false,
          columns:[],
          data:[],
          total: 0,
          pageSize: 10,
          pageIndex:1,
          selection:false,
          selectionFixed:false,
          pageFunc: ()=>{}
    } 
}
